def get_feature_map(dataset):
    # 使用 with 语句自动管理文件关闭
    with open(f'data/raw/{dataset}/list.txt', 'r', encoding='cp936') as feature_file:
        feature_list = []
        for ft in feature_file:
            feature_list.append(ft.strip())
    return feature_list


def get_fc_graph_struc(dataset):
    # 同样使用 with 语句
    with open(f'data/raw/{dataset}/list.txt', 'r', encoding='cp936') as feature_file:
        feature_list = [ft.strip() for ft in feature_file]

    struc_map = {}
    for ft in feature_list:
        struc_map[ft] = [other_ft for other_ft in feature_list if other_ft != ft]
    return struc_map
